using System;
using System.Linq;
using System.Xml.Linq;
using System.IO;

namespace RunAllTestsInSolutionTask
{
    public abstract class BaseProjectParser : IProjectParser
    {
        protected const string TEST_TYPE_GUID =
                "{3AC096D0-A1C2-E12C-1390-A8335801FDAB}";

        protected string _projectFileName;
        protected XDocument _projectXml;
        
        public BaseProjectParser(string projectFileName)
        {
            if (!File.Exists(projectFileName))
                throw new ArgumentException("Project File Doesn't Exists: " + projectFileName);
            _projectFileName = projectFileName;
            _projectXml = XDocument.Load(_projectFileName);
        }


        public abstract string GetOutputFile(string configuration);

        public abstract bool IsTestProject();
    }
}
